FROM openjdk:8-jre-alpine3.9
# MAINTAINER kennylee26 <kennylee26@gmail.com>
# 使用阿里云镜像
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

# Install base packages
RUN apk --no-cache update && \
    apk --no-cache upgrade && \
    apk --no-cache add tzdata && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    apk del tzdata && \
    echo "Asia/Shanghai" > /etc/timezone && \
    rm -fr /tmp/* /var/cache/apk/* && \
    addgroup -g 1200 -S www && \
    adduser -u 1200 -D -S -G www www && \
    apk --no-cache add python2
# glibc
#RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
#    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk
#    apk add glibc-2.32-r0.apk
#    rm -rf glibc-2.32-r0.apk

ENV JAVA_OPTS="-server -Xms128m -Xmx1024m" \
    TZ=Asia/Shanghai
# Define bash as default command
CMD ["/bin/bash"]


